<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //ES6:语法糖
        class Student{
            constructor(name,age){
                this.name=name
                this.age=age
                console.log("hi")
            }
            sayHello(){
                console.log("你好")
            }
        }
        class Person{
            constructor(name,age){
                this.name=name
                this.age=age
            }
        }
        let s1=new Student("zhangsan",18)
        console.log(s1)
        s1.sayHello()
        s2=new Student("lisi",19)
        console.log(s2)
        console.log(s1.prototype===s2.prototype)
        p1=new Person("wangwu",20)
        console.log(p1)
        console.log(s1.__proto__===p1.__proto__)
        let product={
            name:"iphone",
            price:9999
        }
        let keys=Object.keys(product)
        console.log(keys)
        value=Object.values(product)
        console.log(value)
        let entries=Object.entries(product)
        console.log(entries)
        for(items of entries){
            console.log(items)
            for(item of items){
                console.log(item)
            }
        }
    </script>
</body>
</html>